import React from "react";
import styled, {ThemeProvider,ThemeConsumer} from 'styled-components';

// Define what props.theme will look like
const theme = {
  main: "mediumseagreen"
};

class MyComponent extends React.Component {
  render() {
    return (
      <ThemeConsumer>
        {theme => <div>
          MyComponent
          <br/>
          {theme.main}
        </div>}
      </ThemeConsumer>
    );
  }
}

export default ()=>(
  <div>
    <ThemeProvider theme={theme}>
      <MyComponent/>
    </ThemeProvider>
  </div>
)
